<div class="slide-dialog-header">
	<h2>{{title}}</h2>
	<div class="slide-dialog-toolbar">
		<ul>
			<li><span class="ui-btn slide-dialog-close" ng-click="close(false)"><i class="fa fa-remove"></i></span></li>
		</ul>
	</div>
</div>
<div class="slide-dialog-body x-slide-dialog-body">
	<div class="x-data-panel-fixed">
		<form name="form" novalidate="novalidate" ng-submit="submit(form.$valid);">
			<div class="x-data-panel-body">
				<!-- <div class="data-tabs">
					<div class="data-tab-nav">
						<ul>
							<li class="active"><em>部门信息</em></li>
							<li><em>所属部门</em></li>
							<li><em>所属角色</em></li>
						</ul>
					</div>
					<div class="data-tab-content">
						<div class="data-tab-panel">
							<div class="data-form">
								<dl>
									<dt><span class="x-star">*</span>部门名称：</dt>
									<dd>
										<input type="text" name="name" ng-model="data.name" class="x-ipt" placeholder="请输入部门名称" required />
										<div class="x-error" ng-if="interacted(form.name)" ng-messages="form.name.$error">
			                                <span ng-message="required">部门名称不能为空</span>
			                            </div>
									</dd>
								</dl>
								<dl>
									<dt>备注：</dt>
									<dd><textarea ng-model="data.desc" class="x-ipt" rows="8"></textarea></dd>
								</dl>
							</div>
						</div>
					</div>
				</div> -->
				<uib-tabset active="active">
					<uib-tab index="0" heading="部门信息">
						<div class="data-form">
							<dl>
								<dt><span class="x-star">*</span>部门名称：</dt>
								<dd>
									<input type="text" name="name" ng-model="data.name" class="x-ipt" placeholder="请输入部门名称" maxlength="50" remote="{name: 'org_depart_name_valid', params: {id: data.id}}" required />
									<div class="x-error" ng-if="interacted(form.name)" ng-messages="form.name.$error">
		                                <span ng-message="required">部门名称不能为空</span>
		                                <span ng-message="remote">部门名称已存在</span>
		                            </div>
								</dd>
							</dl>
							<dl>
								<dt>备注：</dt>
								<dd><textarea ng-model="data.remark" maxlength="200" class="x-ipt" rows="8"></textarea></dd>
							</dl>
						</div>
					</uib-tab>
					<uib-tab index="1" heading="所属部门">
						<div kendo-tree-view="$parent.$parent.tree" k-options="treeOptions">
			                <span class="k-node" k-template>
			                    <i class="fa fa-{{dataItem.className || 'folder-open'}}"></i> {{dataItem.text}}
			                </span>
			            </div>
					</uib-tab>
					<uib-tab index="2" heading="所属角色">
						<div class="data-form">
							<table cellspacing="0" cellpadding="0">
								<colgroup>
									<col />
									<col width="46" />
									<col />
								</colgroup>
								<tbody>
									<tr>
										<td><select ng-model="cache_select_roles" multiple class="x-multiple" ng-options="m.id as m.name for m in roles"></select></td>
										<td class="align-middle"><span class="ui-button" ng-click="moveAdd(cache_select_roles, data.roles)"><i class="fa fa-angle-double-right"></i></span><span class="ui-button" ng-click="moveRemove(data.roles, cache_target_roles)"><i class="fa fa-angle-double-left"></i></span></td>
										<td><select ng-model="cache_target_roles" ng-init="data.roles=data.roles||[]" multiple class="x-multiple" ng-options="m.id as m.name for m in data.roles"></select></td>
									</tr>
								</tbody>
							</table>
						</div>
					</uib-tab>
				</uib-tabset>
			</div>
			<div class="x-data-panel-footer">
				<button class="dialog-button cancel-button" type="button" ng-click="close(false)">取消</button><button class="dialog-button" type="submit" ng-disabled="formDisabled">提交</button>
			</div>
		</form>
	</div>
</div>